﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DiplomaWeb.Models.ConsultantOfPart
{
    public class ConsultantOfPartListViewModel
    {
        public List<ConsultantOfPartViewModel> ConsultantOfParts { get; set; }

        public void ToViewModel(IEnumerable<Diploma.Models.ConsultantOfPart> source)
        {
            if (source != null)
            {
                ConsultantOfParts = source.Select(r => new ConsultantOfPartViewModel
                                                           {
                                                               Id = r.Id,
                                                               Text = r.Text
                                                           }).ToList();
            }
        }
    }
}